package
{
	import flash.display.Sprite;
	import flash.events.Event;

	public class Something extends Sprite
	{
		
		private var sp:Sprite;
		public function Something()
		{
			super();
		}
		private var bgColor:uint       = 0xFFCC00;
		public function addMe(sp:Sprite){
			this.sp = sp;
			this.x = 50;
			this.y	= 500;
			this.graphics.beginFill(bgColor);
            this.graphics.lineStyle(1);
			this.graphics.drawCircle(0,0,10);
			sp.addChild(this);
			this.addEventListener(Event.ENTER_FRAME, doHandler);
		}
		
		public function doHandler(e:Event):void{
			if(this.x > 1000){
				this.removeEventListener(Event.ENTER_FRAME, doHandler);
				sp.removeChild(this);
			}
			
			this.x = this.x + 8;
		}
	}
}